import Vue from 'vue'
/** 
 * 病例-生育史管理服务
 */
export default {
  /**
   * 添加生育史
   * @param {*} params 
   * @param {*} config 
   * @returns
   */
  async addChildbearingHistory(params = {}, config = {}) {
    let result = await Vue.http.post('/MedicalRecordChildbearingHistory/AddChildbearingHistory', params, config);
    return result;
  },
  /**
   *更新生育史
   * @param {*} params 
   * @param {*} config 
   * @returns
   */
  async updateChildbearingHistory(params = {}, config = {}) {
    let result = await Vue.http.put('/MedicalRecordChildbearingHistory/UpdateChildbearingHistory', params, config);
    return result;
  },
  /**
   * 通过用户编号获取生育史
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async getChildbearingHistoryByUserID(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/MedicalRecordChildbearingHistory/GetChildbearingHistoryByUserID', config);
    return result;
  },
  /**
   * 通过编号获取生育史
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async getChildbearingHistoryByID(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/MedicalRecordChildbearingHistory/GetChildbearingHistoryByID/{id}', config);
    return result;
  }
}
